import axios from 'axios'

// 上传图片到后端，获取MinIO的URL
export const uploadImage = (file) => {
    const formData = new FormData()
    formData.append('file', file) // 与后端@RequestParam("file")对应
    return axios.post('/patrol/upload/image', formData, {
        headers: {
            'Content-Type': 'multipart/form-data' // 表单上传格式
        }
    })
}